<%--
  Created by IntelliJ IDEA.
  User: lw
  Date: 2021/6/25
  Time: 13:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>社区管理系统</title>
    <link rel="stylesheet" href="http://x.xuebingsi.com/x-admin/v2.2/css/font.css">
    <link rel="stylesheet" href="http://x.xuebingsi.com/x-admin/v2.2/css/xadmin.css">
    <link rel="stylesheet" href="<c:url value="/static/css/xadmin.css"/> ">
    <link rel="stylesheet" href="<c:url value="/webjars/font-awesome/4.7.0/css/font-awesome.min.css"/>" media="all">
    <script src="<c:url value="/static/lib/layui/layui.js" />" charset="utf-8"></script>
    <script type="text/javascript" src="<c:url value="/static/js/xadmin.js" />"></script>
    <script>
        //页面加载调用
        window.onload=function(){
            //每1秒刷新时间
            setInterval("NowTime()",1000);
        }
        function NowTime(){
            //获取年月日
            var time=new Date();
            var year=time.getFullYear();
            var month=time.getMonth();
            var day=time.getDate();

            //获取时分秒
            var h=time.getHours();
            var m=time.getMinutes();
            var s=time.getSeconds();

            //检查是否小于10
            h=check(h);
            m=check(m);
            s=check(s);
            document.getElementById("nowtime").innerHTML="当前时间："+year+"年"+(month+1)+"月"+day+"日  "+h+":"+m+":"+s;
        }
        //时间数字小于10，则在之前加个“0”补位。
        function check(i){
            //方法一，用三元运算符
            var num;
            i<10?num="0"+i:num=i;
            return num;

            //方法二，if语句判断
            //if(i<10){
            //    i="0"+i;
            //}
            //return i;
        }
    </script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <blockquote class="layui-elem-quote">欢迎管理员：
                        <span class="x-red">${sessionScope.currentUser.getaNo()}</span>！<span id="nowtime"></span>
                    </blockquote>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">数据统计</div>
                <div class="layui-card-body ">
                    <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                        <li class="layui-col-md4 layui-col-xs6">
                            <a style="height: 82px;" href="javascript:;" class="x-admin-backlog-body">
                                <h2>用户总数</h2>
                                <p>
                                    <cite>${usersize}</cite>
                                </p>
                                <h3> </h3>
                            </a>
                        </li>
                        <li class="layui-col-md4 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h2>房间总数</h2>
                                <p>
                                    <cite>${roomsize}</cite></p>
                                <c:if test="${roomsizenull != 0}">
                                    <h3>剩余房间:<span class="layui-badge layui-bg-blue">${roomsizenull}</span></h3>
                                </c:if>
                                <c:if test="${roomsizenull == 0}">
                                    <h3>剩余房间:<span class="layui-badge-rim">${roomsizenull}</span></h3>
                                </c:if>
                            </a>
                        </li>
                        <li class="layui-col-md4 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h2>车位总数</h2>
                                <p>
                                    <cite>${parkingsize}</cite></p>
                                <c:if test="${parkingsizenull != 0}">
                                    <h3>剩余车位:<span class="layui-badge layui-bg-blue">${parkingsizenull}</span></h3>
                                </c:if>
                                <c:if test="${parkingsizenull == 0}">
                                    <h3>剩余车位:<span class="layui-badge-rim">${parkingsizenull}</span></h3>
                                </c:if>
                            </a>
                        </li>
                        <li class="layui-col-md4 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h2>投诉总数</h2>
                                <p>
                                    <cite>${complaintsize}</cite></p>
                                <c:if test="${complaintsizeStatic != 0}">
                                    <h3>未处理:<span class="layui-badge">${complaintsizeStatic}</span></h3>
                                </c:if>
                                <c:if test="${complaintsizeStatic == 0}">
                                    <h3>未处理:<span class="layui-badge-rim">${complaintsizeStatic}</span></h3>
                                </c:if>
                            </a>
                        </li><li class="layui-col-md4 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h2>维修总数</h2>
                                <p>
                                    <cite>${repairsize}</cite></p>
                                <c:if test="${repairsizeStatic != 0}">
                                    <h3>未处理:<span class="layui-badge">${repairsizeStatic}</span></h3>
                                </c:if>
                                <c:if test="${repairsizeStatic == 0}">
                                    <h3>未处理:<span class="layui-badge-rim">${repairsizeStatic}</span></h3>
                                </c:if>
                            </a>
                        </li><li class="layui-col-md4 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h2>账单总数</h2>
                                <p>
                                    <cite>${paysize}</cite></p>
                                <c:if test="${paysizeStatic != 0}">
                                    <h3>未缴费:<span class="layui-badge">${paysizeStatic}</span></h3>
                                </c:if>
                                <c:if test="${paysizeStatic == 0}">
                                    <h3>未缴费:<span class="layui-badge-rim">${paysizeStatic}</span></h3>
                                </c:if>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
<%--        <div class="layui-col-md12">--%>
<%--            <div class="layui-card">--%>
<%--                <div class="layui-card-header">系统信息</div>--%>
<%--                <div class="layui-card-body ">--%>
<%--                    <table class="layui-table">--%>
<%--                        <tbody>--%>
<%--                        <tr>--%>
<%--                            <th>当前版本</th>--%>
<%--                            <td>1.0.0</td></tr>--%>
<%--                        <tr>--%>
<%--                            <th>服务器地址</th>--%>
<%--                            <td>localhost:8080</td></tr>--%>
<%--                        <tr>--%>
<%--                            <th>运行环境</th>--%>
<%--                            <td>Tomcat 8.5.63</td></tr>--%>
<%--                        <tr>--%>
<%--                            <th>MYSQL版本</th>--%>
<%--                            <td>8.0.23</td></tr>--%>
<%--                        </tbody>--%>
<%--                    </table>--%>
<%--                </div>--%>
<%--            </div>--%>
<%--        </div>--%>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">开发团队</div>
                <div class="layui-card-body ">
                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <th>版权所有</th>
                            <td>生产实训第二小组</td>
                        </tr>
                        <tr>
                            <th>开发者</th>
                            <td>生产实训第二小组</td></tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
